-- GENERATED SPELL FOR [Jaedenar Cultist] --


function spell0_7112(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7112', 651, 1)
end

function spell1_7112(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7112', 3000, 1)
end

function spell2_7112(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7112', 18000, 1)
end

function Sorts_7112(pUnit, Event)
local choix_sorts_7112 = math.random(0, 2)
if choix_sorts_7112 == 0 then
pUnit:RegisterEvent('spell0_7112', 1, 1)
end
if choix_sorts_7112 == 1 then
pUnit:RegisterEvent('spell1_7112', 1, 1)
end
if choix_sorts_7112 == 2 then
pUnit:RegisterEvent('spell2_7112', 1, 1)
end
end

function mob7112_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7112', math.random(1500, 3000), 1)
end

function mob7112_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7112_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7112_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7112, 1, 'mob7112_Action')
RegisterUnitEvent(7112, 2, 'mob7112_Leave')
RegisterUnitEvent(7112, 3, 'mob7112_Kill')
RegisterUnitEvent(7112, 4, 'mob7112_Die')
